\documentclass{article}

\usepackage{standalone}
\standalonetrue
\usepackage{estilo}

\title{HIV-1 Models Overview}
\author{Ricardo Cruz}

\begin{document}

\ifstandalone
\maketitle
\fi





\section{Methodology}

Models serve either to \textbf{describe} a phenomenon (from the past), or to \textbf{predict} events (into the future), or to hypothesis and test theories with regard to congruence. Depending on exactly what one wants to describe or predict, several approaches have been undertaken for the study of HIV dynamics. HIV may very well be the disease with the widest scope of modeling apparatus. With regard to the data we have to work with, we have blood measurement of free virions (RNA copies), and (though not always) CD4\textsuperscript{+} T cell counts, whose counts are orders of magnitude smaller and thus harder to measure. The available model methods include:

\vspace{-\topsep}
\begin{itemize}
\item \glspl{ODE}  \tikzmark{ode}
\item \glspl{PDE}  \tikzmark{pde}
\item \glspl{SDE}  \tikzmark{sde}
\item \glspl{CTMC} \tikzmark{cmtc}
\item \glspl{CA}
\item \glspl{ABM}  \tikzmark{abm}
\item Machine learning --- for instance, neural networks
\end{itemize}
\vspace{-\topsep}

\begin{tikzpicture}[overlay, remember picture]
  \draw [decoration={brace,amplitude=0.5em},decorate,ultra thick,black]
    let \p1=(ode), \p2=(pde), \p3=(cmtc) in
    ({\x3+2em}, {\y1+0.8em}) -- node[right=0.6em] {deterministic} ({max(\x1,\x2,\x3)+2em}, {\y2});
  \draw [decoration={brace,amplitude=0.5em},decorate,ultra thick,black]
    let \p1=(sde), \p2=(abm), \p3=(cmtc) in
    ({\x3+2em}, {\y1+0.8em}) -- node[right=0.6em] {stochastic} ({\x3+2em}, {\y2});
\end{tikzpicture}

The first set of models concern the mean population behavior, while the stochastic models allow the modeling of distributions of population trajectories which may also be useful in prediction. Both groups may be used to complement each other, whereby one traces tendencies, the other studies dispersion. Machine learning models are an entirely different beast, and will be reviewed later. They are usually blackboxes created by artificial intelligence systems that are not suitable for human interpretation and cannot be used to make sense of the phenomenon (description), but are the most deployed and accurate predictors.

\citet{Perelson1993} worked out a first model of HIV dynamics using a system of \textbf{\glspl{ODE}}. The model tracked: healthy helper T cells ($T$), latently infected helper T cells ($T^*$), productively infected helper T cells ($T^{**}$), and free virions ($V$). Usually, productively infected and latently infected are merged to a single infected helper T cell compartment ($T^*$), as they simplified in a later article \citep{Perelson1996}. Even the simple \gls{ODE} described below can provide for a statistically significant fit of patients disease history, and thus find some interesting parameters and properties about their disease. A system of \glspl{ODE} is used to model the disease, whereby compartments are used to represent the various agents, in their various states. These models may even carry spatial information \citep{Graw2012}. Some examples are presented below. \emph{(See section \ref{ODE}.)}

\glspl{ODE} can represent discrete properties of each individual being model, through the usage of compartments, but fails short when it comes to continuous variables such as physical coordinates for spatial modeling, which must be discretized. \textbf{\glspl{PDE}} allow the incorporation of continuous variables, and, for instance, \citet{Su2009} makes use of \glspl{PDE} to attempt at a model of spacial immune response. Of course, numerical integrators will discretize the system of \glspl{PDE}.

At the other end of the spectrum, \textbf{\glspl{ABM}} are mini-models where what is modeled are individuals (or agents) and not aggregates. This paradigm turns things upside-down; each individual in the model stores its properties, rather than individuals being categorized in compartments. It is a more natural paradigm for domain experts because it is logically structured closer to the phenomenon at study. It is a more direct reality-model mapping. Other advantages are that \glspl{ABM} allow us to trace the fate of a particular agent; also, \glspl{ABM} can easily associate continuous quantities to an agent; these quantities have to be discretized for most other mathematical models. Continuous variables are possible using \glspl{PDE}, but easily become unmanageable and numerical integration boils down to discretization. Their complexity depends heavily on the implementation, but, usually, particle simulators (which can be seen as a type of \gls{ABM}) have execution times of time complexity $O(n^2)$, and space complexity of $O(n)$ \citep{stochsim}. Interestingly, here $n$ refers to the number of agents, not of compartments as in a system of \glspl{ODE} or reactions as in the \gls{CTMC} method we will see below; so it is conceivable that an \glspl{ABM} is faster than a \gls{ODE} model for very small population that has too many properties that need compartmentalizing. If we would like to add a new agent property, whose value range is $k$, to an \gls{ODE} model, it will require $n(k-1)$ new compartments, increasing by that order of magnitude the complexity of the numerical integrator algorithm. Viewed in another way, in \glspl{ABM} we iterate agents; in \glspl{ODE} we iterate variables. \footnote{Talvez interessante explorar um pouco esta diferença de complexidades.} \glspl{ODE} do have the advantage that, being deterministic, a single run is enough to produce the desirable statistics; furthermore conclusions, and sometimes results, can be obtained analytically for the simpler models. Computation gains may be obtained through the usage of distributed computing techniques. \emph{(See section \ref{ABM}.)}

The primogenitor and computationally less demanding versions of \glspl{ABM} models are \textbf{\glspl{CA}}, whereby space (which may not be physical space) is divided in cells, which are usually squares connected to its 4 neighbors (up,down,left,right, aka von Neumann neighborhood) or 8 neighbors if we include the diagonals (Moore neighborhood). Each cell is an integer, which are usually rendered visually in different colors. An instantiation of \glspl{CA} is the \textbf{Potts model}, loosely inspired in the Ising model, whereby each cell on the grid has a number representing the id of the biological cell there. Therefore a biological cell may occupy several \gls{CA} cells, and thus volume and shape is realized and such phenomena as cell growth and division, and as elongation and movement, can be more accurately simulated. When form is of no concern, an \glspl{ABM} such as a particle simulator may be computationally preferable. The following picture, contrasts a \gls{CA} against a Potts model; the Potts model is functionally richer, but computationally slower in that a cell may have shape.

In 1976, Gillespie proved his algorithm of \textbf{stochastic simulation} of biochemical reactions gave the same results as conventional kinetic treatments using \gls{ABM} particle simulators \citep{Gillespie1976, Gillespie1977}. The original algorithm used a random variable to control time until next event/reaction, and another to choose which reaction will occur --- it may be seen as a Markov chain in continuous time (CTMC). Further optimizations are available, as discussed below. \emph{(See section \ref{gillespie}.)}

A qualitatively comparison of the several modeling methods on the \textbf{complexity effect} of upgrading several parameters: (the lower the better)

\noindent
\begin{center}
\rowcolors{1}{}{gray!10}
\begin{tabular}{lcc}
\textbf{Method} & \textbf{Agents $\uparrow$} & \textbf{Reactions $\uparrow$} \\\midrule
\gls{ODE} & $=$ & $\uparrow$ \\
\gls{CTMC} & mostly $\downarrow$ & $\uparrow$ \\
\gls{ABM} & $\uparrow \uparrow$ & $=$ \\
\hline
\end{tabular}
\end{center}
\rowcolors{1}{}{}


A comparison of methods in terms of modeling power:

\noindent
\begin{center}
\rowcolors{1}{}{gray!10}
\begin{tabular}{lcc}
& \multicolumn{2}{c}{\textbf{Variables}} \\
\hiderowcolors
\textbf{Method} & \textbf{Discrete} & \textbf{Continuous} \\\midrule
\showrowcolors
\gls{ODE}  & \checkmark & $\times$ \\
\gls{CTMC} & \checkmark & $\times$ \\
\gls{ABM}  & \checkmark & \checkmark \\
\hline
\end{tabular}
\end{center}
\rowcolors{1}{}{}

In terms of modeling power, the expressive power of each modeling approach can be put as:

\noindent
\begin{center}
\begin{tikzpicture}
\node [draw] (ode) {\gls{ODE}};
\node [above=0.2em of ode] (pde) {\gls{PDE}};
\node [above=0.4em of pde] (ctmc) {\gls{CTMC}};
\node [draw, right=1.5em of ctmc] (ca) {\gls{CA}};
\node [above=1em of ctmc, left] (abm) {\gls{ABM}};

\node[fit=(ode)] (pde-group) {};
\node[fit=(pde-group)] (ctmc-group) {};
\node[fit=(ca) (ctmc-group)] (abm-group) {};

\node[draw, inner sep=0.1em, outer sep=0, fit=(abm) (abm-group)] {};
\node[draw, inner sep=0.1em, outer sep=0, fit=(ctmc) (ctmc-group)] {};
\node[draw, inner sep=0.1em, outer sep=0, fit=(pde) (pde-group)] {};
\end{tikzpicture}
\end{center}









%%% END

\ifstandalone
\printglossary
\printbibliography
\fi

\end{document}
